<?php

/**
 * Checks if the session is valid
 * @param string $sessionID
 * @param int $userID
 */
function checkIfValidSession($sessionID, $userID){
	$r = SessionManager::continueSession($sessionID);
	if($r) $r = ($_SESSION['USER_ID'] == $userID);
	$res = new ResultJSON(false, $sessionID);
	$res->addItem('r', $r);
	echo $res->renderView();
}

?>